<template>
    <div>
        <div class="crumbs">
            <el-breadcrumb separator="/">
                <el-breadcrumb-item>
                    <!-- <div class="indexTitle">楼幢管理</div> -->
                    <div class="contentsize">楼幢信息</div>
                </el-breadcrumb-item>
            </el-breadcrumb>
        </div>
        <div class="container">
            <div class="handle-box">
                <el-form ref="form" :model="form" label-width="120px" :inline="true" size="mini">
                    <el-form-item label="区属名称:">
                        <div style="width:170px">
                            <el-select v-model="form.qs" placeholder="请选择区属名称" clearable @change="onSearch">
                                <el-option v-for="item in qslist" :key="item.value" :label="item.label"
                                    :value="item.value">
                                </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <el-form-item label="产别类型:">
                        <div style="width:170px">
                            <el-select v-model="form.cb" placeholder="请选择产别类型" clearable @change="onSearch">
                                <el-option v-for="item in cblist" :key="item.code" :label="item.name"
                                    :value="item.code">
                                </el-option>
                            </el-select>
                            <!-- <el-input v-model="form.cb" placeholder="请输入产别类型"></el-input> -->
                        </div>
                    </el-form-item>
                    <el-form-item label="权证类型:">
                        <div style="width:170px">
                            <!-- <el-select v-model="form.qzlx" placeholder="请选择权证类型" clearable>
                                <el-option v-for="item in qzlxlist" :key="item.code" :label="item.name" :value="item.code">
                                </el-option>
                            </el-select> -->
                            <el-input v-model="form.qzlx" placeholder="请输入权证类型"
                                @keyup.enter.native="onSearch"></el-input>
                        </div>
                    </el-form-item>
                    <el-form-item label="档案编号:">
                        <div style="width:170px">
                            <el-input v-model="form.dabh" placeholder="请输入档案编号"
                                @keyup.enter.native="onSearch"></el-input>
                        </div>
                    </el-form-item>
                    <el-form-item label="土地使用权类型:">
                        <div style="width:170px">
                            <!-- <el-select v-model="form.tdsyqlx" placeholder="请选择土地使用权类型" clearable>
                                <el-option v-for="item in tdsyqlxlist" :key="item.code" :label="item.name"
                                    :value="item.code">
                                </el-option>
                            </el-select> -->
                            <el-input v-model="form.tdsyqlx" placeholder="请输入土地使用权类型"
                                @keyup.enter.native="onSearch"></el-input>
                        </div>
                    </el-form-item>
                    <el-form-item label="建筑面积:">
                        <div style="width:170px">
                            <el-col :span="11">
                                <el-input v-model="form.jzmja" @keyup.enter.native="onSearch"></el-input>
                            </el-col>
                            <el-col class="line" :span="2"><span style="font-size: 12px;">至</span></el-col>
                            <el-col :span="11">
                                <el-input v-model="form.jzmjb" @keyup.enter.native="onSearch"></el-input>
                            </el-col>
                        </div>
                    </el-form-item>
                    <el-form-item label="风貌建筑:" v-if="type != '1'">
                        <div style="width:170px">
                            <el-select v-model="form.fmjz" placeholder="请选择是否为风貌建筑" clearable
                                @change="onSearch1('fmjz', form.fmjz)">
                                <el-option v-for="item in sflist" :key="item.code" :label="item.name"
                                    :value="item.code">
                                </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <el-form-item label="风貌保护等级:" v-if="type != '1'">
                        <div style="width:170px">
                            <el-select v-model="form.fmjzjb" placeholder="请选择风貌建筑保护等级" clearable @change="onSearch"
                                :disabled="fmjzjbshow">
                                <el-option v-for="item in fmjzjblist" :key="item.code" :label="item.name"
                                    :value="item.code">
                                </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <el-form-item label="文物保护:" v-if="type != '1'">
                        <div style="width:170px">
                            <el-select v-model="form.wwbh" placeholder="请选择是否为文物保护" clearable
                                @change="onSearch1('wwbh', form.wwbh)">
                                <el-option v-for="item in sflist" :key="item.code" :label="item.name"
                                    :value="item.code">
                                </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <el-form-item label="文物保护级别:" v-if="type != '1'">
                        <div style="width:170px">
                            <el-select v-model="form.wwbhjb" placeholder="请选择文物保护级别" clearable @change="onSearch"
                                :disabled="wwbhjbshow">
                                <el-option v-for="item in wwbhjblist" :key="item.code" :label="item.name"
                                    :value="item.code">
                                </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <el-form-item label="小洋楼招商:" v-if="type != '1'">
                        <div style="width:170px">
                            <el-select v-model="form.zsxyl" placeholder="请选择是否为小洋楼招商" clearable @change="onSearch">
                                <el-option v-for="item in sflist" :key="item.code" :label="item.name"
                                    :value="item.code">
                                </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <el-form-item label="部门:" v-if="type == '0'">
                        <div style="width:170px">
                            <el-select v-model="form.type" placeholder="请选择部门" @change="onSearch">
                                <el-option v-for="item in yhlxlist" :key="item.code" :label="item.name"
                                    :value="item.code">
                                </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <!-- <el-form-item label="产权单位:">
                        <div style="width:170px">
                            <el-input v-model="form.cqdw" placeholder="请输入产权单位"></el-input>
                        </div>
                    </el-form-item> -->
                    <el-form-item label="房屋地址:">
                        <div style="width:170px">
                            <el-input v-model="form.fwdz" placeholder="请输入房屋地址"
                                @keyup.enter.native="onSearch"></el-input>
                        </div>
                    </el-form-item>
                    <el-form-item label="房产状态:">
                        <div style="width:170px">
                            <el-select v-model="form.fczt" placeholder="请选择房产状态" clearable @change="onSearch">
                                <el-option v-for="item in fcztlist" :key="item.code" :label="item.name"
                                    :value="item.code">
                                </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <el-form-item label="房屋性质:">
                        <div style="width:170px">
                            <el-select v-model="form.fwyt" placeholder="请选择房屋性质" clearable @change="onSearch">
                                <el-option v-for="item in fwytlist" :key="item.code" :label="item.name"
                                    :value="item.code">
                                </el-option>
                            </el-select>
                        </div>
                    </el-form-item>
                    <!-- <el-form-item label="管房单位:">
                        <div style="width:170px">
                            <el-select v-model="form.gfdw" placeholder="请选择管房单位" :disabled="form.gfdw != ''">
                                <el-option v-for="item in gfdwlist" :key="item.code" :label="item.name" :value="item.code">
                                </el-option>
                            </el-select>
                        </div>
                    </el-form-item> -->
                    <el-form-item>
                        <el-button type="primary" @click="onSearch" icon="el-icon-search"
                            class="searchcolor">查询</el-button>
                        <el-button @click="reSearch" class="searchcolor" icon="el-icon-refresh">重置</el-button>
                        <el-button type="primary" @click="downloadlist" icon="el-icon-download"
                            class="searchcolor">导出</el-button>
                    </el-form-item>
                    <!-- <el-form-item>
                        <el-button type="primary" @click="addnew" icon="el-icon-plus" class="addcolor">添加</el-button>
                    </el-form-item> -->
                </el-form>
            </div>
            <!-- max-height="280" -->
            <el-table :data="tableData" style="width: 100%" :header-cell-style="tableHeaderColor"
                :row-style="tablerowColor" :row-class-name="tableRowClassName" :cell-style="tablecellColor" border
                :max-height="maxHeight" show-summary sum-text="合计" :summary-method="getSummaries">
                <el-table-column prop="dabh" label="档案编号" align="center"> </el-table-column>
                <el-table-column prop="qs" label="区属" align="center" width="100"> </el-table-column>
                <el-table-column prop="fwdz" label="房屋地址" align="center" :show-overflow-tooltip="true">
                </el-table-column>
                <!-- <el-table-column prop="lh" label="楼号" align="center" width="60"> </el-table-column> -->
                <el-table-column prop="fwyt" label="房屋性质" align="center" width="100"> </el-table-column>
                <el-table-column prop="cb" label="产别" align="center" width="100"> </el-table-column>
                <el-table-column prop="zlc" label="总层数" align="center" width="80"> </el-table-column>
                <el-table-column prop="jzmj" label="建筑面积" align="center" width="100"> </el-table-column>
                <el-table-column prop="jizumj" label="计租面积" align="center" width="100"> </el-table-column>
                <!-- <el-table-column prop="fczt" label="房产状态" align="center" width="100">
                    <template slot-scope="scope">
                        {{scope.row.fczt=='1'?'未终止':scope.row.fczt=='2'?'已终止':''  }}
                    </template>
</el-table-column> -->
                <el-table-column fixed="right" label="操作" width="100" align="center">
                    <template slot-scope="scope">
                        <router-link :to="{ name: 'detaillz', params: { id: scope.row.id } }">
                            <el-button type="text" size="small">查看</el-button>
                        </router-link>
                        <!-- <router-link :to="{ name: 'editlz', params: { id: scope.row.id } }" style="padding-right: 12px">
                            <el-button type="text" size="small">编辑</el-button>
                        </router-link> -->
                        <!-- <router-link :to="{ name: 'addfj', params: { id: scope.row.id } }" style="padding-right: 12px">
                            <el-button type="text" size="small">房间录入</el-button>
                        </router-link> -->
                        <!-- <el-button type="text" size="small" @click="deleteClick(scope.row)"
                            style="color: red">删除</el-button> -->
                    </template>
                </el-table-column>
            </el-table>
            <div class="pagination" style="float: right">
                <el-pagination background layout="total,prev, pager, next,jumper" :total="total"
                    :current-page.sync="current" :page-size="pageSize" @current-change="handleCurrentChange">
                </el-pagination>
            </div>
        </div>
        <!-- 添加房间 -->
        <el-dialog title="房间录入" :visible.sync="addlistval" :modal-append-to-body="false" center width="80%">
            <div style="height: 400px;overflow-y:auto;overflow-x:hidden;">
                <el-form ref="form" :model="fjform" label-width="120px" :inline="true" label-position="top"
                    :rules="rules">
                    <el-form-item label="区属名称:" style="width: 24%" prop="qs">
                        <el-select v-model="fjform.qs" placeholder="请选择区属名称" clearable style="width: 100%">
                            <el-option v-for="item in qslist" :key="item.value" :label="item.label" :value="item.value">
                            </el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item label="房屋地址:" style="width: 24%" prop="fwdz">
                        <el-input v-model="fjform.fwdz" placeholder="请输入房屋地址" class="search-input"></el-input>
                    </el-form-item>
                    <el-form-item label="门号:" style="width: 24%" prop="mh">
                        <el-input v-model="fjform.mh" placeholder="请输入门号" class="search-input"></el-input>
                    </el-form-item>
                    <el-form-item label="房间号:" style="width: 24%" prop="fjh">
                        <el-input v-model="fjform.fjh" placeholder="请输入房间号" class="search-input"></el-input>
                    </el-form-item>
                    <el-form-item label="建筑面积:" style="width: 24%" prop="jzmj">
                        <el-input v-model="fjform.jzmj" placeholder="请输入建筑面积" class="search-input"></el-input>
                    </el-form-item>
                    <el-form-item label="产别:" style="width: 24%" prop="cb">
                        <el-select v-model="fjform.cb" placeholder="请选择产别类型" clearable style="width: 100%">
                            <el-option v-for="item in cblist" :key="item.code" :label="item.name" :value="item.code">
                            </el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item label="权证类型:" style="width: 24%" prop="qzlx">
                        <el-input v-model="fjform.qzlx" placeholder="请输入权证类型" class="search-input"></el-input>
                        <!-- <el-select v-model="fjform.qzlx" placeholder="请选择权证类型" clearable style="width: 100%">
                            <el-option v-for="item in qzlxlist" :key="item.code" :label="item.name" :value="item.code">
                            </el-option>
                        </el-select> -->
                    </el-form-item>
                    <el-form-item label="计租面积:" style="width: 24%" prop="jizumj ">
                        <el-input v-model="fjform.jizumj" placeholder="请输入计租面积" class="search-input"></el-input>
                    </el-form-item>
                    <el-form-item label="房屋性质:" style="width: 24%" prop="fwyt">
                        <el-select v-model="fjform.fwyt" placeholder="请选择房屋性质" clearable style="width: 100%">
                            <el-option v-for="item in fwytlist" :key="item.code" :label="item.name" :value="item.code">
                            </el-option>
                        </el-select>
                        <!-- <el-input v-model="fjform.fwyt" placeholder="请输入房屋性质" class="search-input"></el-input> -->
                    </el-form-item>
                    <el-form-item label="证书编号:" style="width: 24%" prop="zsbh">
                        <el-input v-model="fjform.zsbh" placeholder="请输入证书编号" class="search-input"></el-input>
                    </el-form-item>
                    <el-form-item label="土地使用权面积:" style="width: 24%" prop="tdsyqmj">
                        <el-input v-model="fjform.tdsyqmj" placeholder="请输入土地使用权面积" class="search-input"></el-input>
                    </el-form-item>
                    <el-form-item label="产权单位:" style="width: 24%" prop="cqdw">
                        <el-select v-model="fjform.cqdw" placeholder="请选择产权单位" clearable style="width: 100%">
                            <el-option v-for="item in cqdwlist" :key="item.code" :label="item.name" :value="item.code">
                            </el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item label="发证日期:" style="width: 24%" prop="fzrq">
                        <el-date-picker type="date" placeholder="选择发证日期" v-model="fjform.fzrq" style="width: 100%"
                            value-format="yyyy-MM-dd"></el-date-picker>
                    </el-form-item>
                    <el-form-item label="土地使用权类型:" style="width: 24%" prop="tdsyqlx">
                        <!-- <el-select v-model="fjform.tdsyqlx" placeholder="请选择土地使用权类型" clearable style="width: 100%">
                            <el-option v-for="item in tdsyqlxlist" :key="item.code" :label="item.name" :value="item.code">
                            </el-option>
                        </el-select> -->
                        <el-input v-model="fjform.tdsyqlx" placeholder="请输入土地使用权类型" class="search-input"></el-input>
                    </el-form-item>
                    <el-form-item label="总楼层:" style="width: 24%" prop="zlc">
                        <el-input v-model="fjform.zlc" placeholder="请输入总楼层" class="search-input"></el-input>
                    </el-form-item>
                    <el-form-item label="所在楼层:" style="width: 24%" prop="lc">
                        <el-input v-model="fjform.lc" placeholder="请输入所在楼层" class="search-input"></el-input>
                    </el-form-item>
                    <el-form-item label="档案编号:" style="width: 24%" prop="dabh">
                        <el-input v-model="fjform.dabh" placeholder="请输入档案编号" class="search-input"></el-input>
                    </el-form-item>
                    <el-form-item label="原值:" style="width: 24%" prop="yz">
                        <el-input v-model="fjform.yz" placeholder="请输入原值" class="search-input"></el-input>
                    </el-form-item>
                    <el-form-item label="评估价格:" style="width: 24%" prop="pgjg">
                        <el-input v-model="fjform.pgjg" placeholder="请输入评估价格" class="search-input"></el-input>
                    </el-form-item>
                    <el-form-item label="户型:" style="width: 24%" prop="hx">
                        <el-input v-model="fjform.hx" placeholder="请输入户型" class="search-input"></el-input>
                    </el-form-item>
                    <el-form-item label="朝向:" style="width: 24%" prop="cx">
                        <el-input v-model="fjform.cx" placeholder="请输入朝向" class="search-input"></el-input>
                    </el-form-item>
                    <el-form-item style="width: 100%" prop="cx">
                        <el-checkbox label="自来水表" name="type" v-model="fjform.zlsb"></el-checkbox>
                        <el-checkbox label="电表" name="type" v-model="fjform.db"></el-checkbox>
                        <el-checkbox label="煤气表" name="type" v-model="fjform.mqb"></el-checkbox>
                        <el-checkbox label="物业费" name="type" v-model="fjform.wyf"></el-checkbox>
                        <el-checkbox label="供热" name="type" v-model="fjform.gr"></el-checkbox>
                        <el-checkbox label="中水水表" name="type" v-model="fjform.zssb"></el-checkbox>
                    </el-form-item>
                    <el-form-item label="备注:" style="width: 100%" prop="note ">
                        <el-input type="textarea" :autosize="{ minRows: 4 }" placeholder="请输入备注" v-model="fjform.note">
                        </el-input>
                    </el-form-item>
                    <!-- 是否支持多文进上传 multiple ref="upload"-->
                    <el-upload class="upload-demo" :action="httpUrl + '/file/uploadFile'" :on-remove="handleRemoves"
                        :before-remove="beforeRemoves" multiple :headers="myHeaders" :on-success="handelfilesuccess"
                        :file-list="filefileList">
                        <div class="unloadTitle">附件</div>
                        <el-button size="small" icon="el-icon-upload2">上传文件</el-button>
                    </el-upload>
                </el-form>
            </div>
            <span slot="footer" class="dialog-footer" style="text-align: center;">
                <el-button type="primary" @click="submitForm('ruleForm')">保存</el-button>
                <el-button @click="addlistval = false">关闭</el-button>
            </span>
        </el-dialog>

        <!-- <el-dialog title="提示信息" :visible.sync="tsmodel" :modal-append-to-body="false" center width="60%">
        </el-dialog> -->
    </div>
</template>
<script>
import { buildlist, builddelete, exportBuildlist, buildlisthj } from '@/api/index';
import global from '@/components/common/httpurl.vue'
import valueList from '@/components/common/valueList.vue'
export default {
    name: 'dashboard',
    data() {
        return {
            type: this.$store.getters.type,
            fmjzjbshow: true,
            wwbhjbshow: true,
            rules: {},
            // 请求表头信息
            myHeaders: {
                'token': localStorage.getItem('token')
            },
            filefileList: [],//文件列表
            httpUrl: global.httpUrl,//公共地址
            total: 0,
            current: 1,
            pageSize: 10,
            form: {
                cb: "",
                cqdw: "",
                create_name: "",
                create_name_id: "",
                create_time: "",
                current: 0,
                dabh: "",
                dscs: "",
                dxcs: "",
                fmjz: "",
                fmjzjb: '',
                wwbh: '',
                wwbhjb: '',
                fwdz: "",
                fwjg: "",
                fwyt: "",
                fzrq: "",
                id: "",
                jdrq: "",
                jzmj: "",
                jzmja: "",
                jzmjb: "",
                jznd: "",
                jzxs: "",
                note: "",
                pageSize: 10,
                qs: "",
                qzlx: "",
                status_code: 0,
                tdsyqlx: "",
                tdsyqmj: "",
                update_name: "",
                update_name_id: "",
                update_time: "",
                yz: "",
                zlc: "",
                zsbh: "",
                zsxyl: "",
                fczt: '1',
                type: this.$store.getters.type
                // gfdw: this.$store.getters.gfdw
                // userId:this.$store.getters.role=='10011'?this.$store.getters.userId:''//如果是房管员就传一个id
            },
            tableData: [],
            qslist: valueList.qslist,
            cqdwlist: valueList.cqdwlist,//产权单位
            fwytlist: valueList.fwytlist,//房屋性质
            cblist: valueList.cblist,//产别
            qzlxlist: valueList.qzlxlist,//权证类型
            tdsyqlxlist: valueList.tdsyqlxlist,//土地使用权类型
            sflist: valueList.sflist,//是否列表
            gfdwlist: valueList.gfdwlist,//管房单位
            fcztlist: valueList.fcztlist,//房产状态
            fmjzjblist: valueList.fmjzjblist,//风貌建筑级别
            wwbhjblist: valueList.wwbhjblist,//文物保护级别
            yhlxlist: valueList.yhlxlist,//部门
            fjform: {
                zlsb: false,
                db: false,
                mqb: false,
                gr: false,
                zssb: false,
                wyf: false
            },//房间表单
            addlistval: false,
            maxHeight: null,
            hjje: {}
        };
    },
    components: {},
    computed: {},
    methods: {
        onDragEnd() {
            // 处理拖拽结束后的逻辑，例如更新数据顺序等
            console.log('Drag ended',this.tableData);
        },
        // height: 54px;
        // 列表样式
        tableHeaderColor({ row, column, rowIndex, columnIndex }) {
            if (rowIndex === 0) {
                return 'background:linear-gradient(to bottom, #008A94,#0ae2f2)!important;color:#ffffff;font-size:14px;'
            }
        },
        tablerowColor({ row, rowIndex }) {
            return 'height: 42px;font-size:14px;color:black'
        },
        tablecellColor() {
            return "font-weight:700;color:#000000;border-color:#c0c0c0";
        },
        tableRowClassName({ row, rowIndex }) {
            if (rowIndex % 2 != 0) {
                return 'success-row' //这是类名
            } else {
                return ''
            }
        },
        // 换页
        handleCurrentChange(val) {
            this.current = val;
            this.form.current = val;
            this.buildlist(this.form);
            console.log(val);
        },
        // 搜索
        onSearch() {
            this.current = 1;
            this.form.current = 1;
            this.buildlist(this.form);
            this.buildlisthj(this.form)
            console.log('搜索');
        },
        onSearch1(name, value) {
            console.log(value)
            if (name == 'fmjz') {
                console.log('fmjz', value)
                this.form.fmjzjb = ''
                this.fmjzjbshow = value == '是' ? false : true
            } else if (name == 'wwbh') {
                console.log('wwbh', value)
                this.form.wwbhjb = ''
                this.wwbhjbshow = value == '是' ? false : true
            }
            this.onSearch()
        },
        // 重置
        reSearch() {
            this.fmjzjbshow = true
            this.wwbhjbshow = true
            this.current = 1;
            this.form = {
                cb: "",
                cqdw: "",
                create_name: "",
                create_name_id: "",
                create_time: "",
                current: 0,
                dabh: "",
                dscs: "",
                dxcs: "",
                fmjz: "",
                fmjzjb: '',
                wwbh: '',
                wwbhjb: '',
                fwdz: "",
                fwjg: "",
                fwyt: "",
                fzrq: "",
                id: "",
                jdrq: "",
                jzmj: "",
                jzmja: "",
                jzmjb: "",
                jznd: "",
                jzxs: "",
                note: "",
                pageSize: 10,
                qs: "",
                qzlx: "",
                status_code: 0,
                tdsyqlx: "",
                tdsyqmj: "",
                update_name: "",
                update_name_id: "",
                update_time: "",
                yz: "",
                zlc: "",
                zsbh: "",
                zsxyl: "",
                fczt: '1',
                type: this.$store.getters.type
            };
            this.buildlist(this.form);
            this.buildlisthj(this.form)
            console.log('搜索');
        },
        // 添加
        addnew() {
            this.$router.push({
                name: 'addlz',
                path: '/addlz'
            });
        },
        // 删除
        deleteClick(e) {
            console.log(e);
            this.$confirm('确定删除此条信息吗？')
                .then(() => {
                    let data = { id: e.id };
                    builddelete(data).then((res) => {
                        if (res.code == 200) {
                            this.buildlist(this.form);
                            this.buildlisthj(this.form)
                            this.$message.success('删除成功');
                        }
                    });
                })
                .catch(() => {
                    this.$message.success('删除取消');
                });
        },
        // 项目列表
        buildlist(data) {
            buildlist(data).then((res) => {
                if (res.code == 200) {
                    console.log(this.$store.getters.role)
                    console.log(this.$store.getters.yzydbnum)
                    console.log(this.$store.getters.dbnum3)
                    if (this.$store.getters.role == '10011') {
                        if (this.$store.getters.yzydbnum == 'true') {
                            alert(`预转已待办数量为${this.$store.getters.dbnum3},请尽快处理！！！`)
                            this.$store.commit('handleyzydbnum', false)
                        } else {
                            console.log(123)
                        }
                    }
                    this.tableData = res.data.records;
                    this.total = res.data.total;
                    this.maxHeight = window.innerHeight - 440
                } else {
                    this.tableData = [];
                    this.total = 0;
                }
            });
        },
        // 项目合计
        buildlisthj(data) {
            buildlisthj(data).then((res) => {
                if (res.code == 200) {
                    this.hjje = res.data
                    console.log(res.data)
                } else {
                    this.$message.error = '请联系管理人员！！'
                }
            });
        },
        // 文件
        handleRemoves(file, fileList) {
            console.log(fileList)
            this.fileListshandle = fileList.map((res) => {
                return res.response.data.id;
            });
            this.fjform.fj = this.fileListshandle.toString()

        },
        // 文件删除前
        beforeRemoves(file, fileList) {
            console.log(file)
            console.log(fileList)
            return this.$confirm(`确定移除 ${file.name}？`);
        },
        // 上传成功
        handelfilesuccess(response, file, fileLists) {
            console.log(fileLists)
            console.log(file)
            this.$message.success('导入成功');
            this.fileListshandle = fileLists.map((res) => {
                console.log(res.response.data)
                return res.response.data.id;
            });
            this.fjform.fj = this.fileListshandle.toString()
        },
        //房间录入弹框 
        addroom(e) {
            console.log(e.id)
            // if (this.$refs.upload) {
            //     this.$refs.upload.clearFiles();
            // }
            // this.filefileList=[]
            // this.fjform = {}//房间表单
            // this.addlistval = true
        },
        // 添加房间
        submitForm() {
            console.log(this.fjform)
        },
        // 导出列表
        downloadlist() {
            exportBuildlist(this.form).then(res => {
                console.log(res)
                const link = document.createElement('a');
                let blob = new Blob([res], {
                    type: 'application/vnd.ms-excel'
                });
                link.style.display = 'none';
                //设置连接
                link.href = URL.createObjectURL(blob);
                link.download = '楼幢导出文件';
                document.body.appendChild(link);
                //模拟点击事件
                link.click();
                console.log(res)
            })
        },
        // 合并计算某一列
        getSummaries(param) {
            const { columns, data } = param;
            const sums = [];
            columns.forEach((column, index) => {
                if (index === 0) {
                    sums[index] = '合计';
                    return;
                }
                // 只对amount这一列进行总计核算。
                if (column.property === 'jizumj') {
                    sums[index] = this.hjje.jizumj
                } else if (column.property === 'jzmj') {
                    sums[index] = this.hjje.jzmj
                } else {
                    sums[index] = '---'
                }
            });
            return sums;
        },
    },
    mounted() {
        console.log('url', process.env.VUE_APP_BASE_API)
        console.log(this.$store.getters)
        this.buildlist(this.form);
        this.buildlisthj(this.form)
        console.log(valueList)
    }
};
</script>
<style>
/* .el-table { overflow: visible !important; } */
.el-table__footer-wrapper tbody td.el-table__cell {
    font-weight: 600;
    background: rgb(246, 238, 217);
}

.tablestyle>.el-table {
    overflow: auto;
}

.tablestyle>.el-table .el-table__body-wrapper,
.tablestyle>.el-table .el-table__header-wrapper,
.tablestyle>.el-table .el-table__footer-wrapper {
    overflow: visible;
}

.tablestyle>.el-table::after {
    position: relative !important;
}
</style>
<style scoped>
.container {
    /* height: calc(100vh - 260px); */
    overflow: hidden;
}

.crumbs {
    background-color: #fff;
    padding: 20px 20px;
}

.indexTitle {
    margin-bottom: 20px;
}

.contentsize {
    font-size: 18px;
    font-weight: 700;
}

.handle-box {
    overflow: hidden;
}

/* 新增按钮 */
.addcolor {
    margin-bottom: 10px;
}

.unloadTitle {
    text-align: left;
    padding-bottom: 10px;
    box-sizing: border-box;
    color: #606266;
}
</style>
<style>
.success-row {
    background-color: #eaf3fb !important;
}
</style>
